@extends('layout.admin.index')
@section('content')
<body>
<div class="panel admin-panel">
  <!-- 子列表显示-管理员添加 -->
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>{{ $title }}</strong></div>
  <div class="body-content">

    <!-- 管理员添加开始-跳转执行添加路由 -->
    <form method="post" class="form-x" action="/admin/admin/doadd">  
    {{ csrf_field() }}
      <div class="form-group">
      </div>


      <!-- 添加用户名 -->
      <div class="form-group">
        <div class="label">
          <label>用户名：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="admin_name" required/><font style="font-size:20px;color:red;">*</font>
          <div class="tips"></div><br>
          <div style="color:#aac;">(管理员用户名,用于登录后台)</div>
        </div>
      </div>

      <!-- 添加邮箱 -->
      <div class="form-group">
        <div class="label">
          <label>邮箱：</label>
        </div>
        <div class="field">
          <input type="email" class="input w50" value="" name="admin_email" required/><font style="font-size:20px;color:red;">*</font>
          <div class="tips"></div><br>
          <div style="color:#aac;">(管理员邮箱,用于登录后台)</div>
        </div>
      </div>

      <!-- 添加密码 -->
      <div class="form-group">
        <div class="label">
          <label>密码：</label>
        </div>
        <div class="field">
          <input type="password" class="input w50" value="" name="admin_pass" required/><font style="font-size:20px;color:red;">*</font>
          <div class="tips"></div><br><br>
          <div style="color:#aac;margin-top:-20px;">(管理员密码，用户登录后台)</div>
        </div>
      </div>

      <!-- 管理员级别 -->
      <div class="form-group">
        <div class="label">
          <label>管理员级别：</label>
        </div>
        <div class="field" style="float:left">
          <if condition="$iscid eq 1">
              <select name="role_id" class="input" style="width:200px; line-height:17px;float:left;" onchange="changesearch()">
                <option value="0" required>请选择分类</option>
              @foreach($data as $k => $v)
                <option value="{{ $k }}" >{{ $v }}</option>
              @endforeach
              </select><font style="font-size:20px;color:red;">*</font>
          </if>
          <div class="tips"></div>
          <br>
          <div style="color:#aac">(请选择管理员级别，便于管理后台。)</div>
        </div>
      </div>




      <!-- 创建时间 -->
      <input type="hidden" name="admin_createtime" value="{{ date('Y-m-d',time()) }}">
      <!-- 登录时间 -->
      <input type="hidden" name="admin_time" value="{{ date('Y-m-d H:i:s',time()) }}">
      <!-- IP -->
      <input type="hidden" name="admin_ip" value="{{ $_SERVER['REMOTE_ADDR'] }}">

      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
          <a href="/admin/admin/index"  class="button bg-main icon-mail-reply">&nbsp返回</a>
        </div>
      </div>
    </form>
    <!-- 管理员添加结束 -->
  </div>
</div>
</body>
@endsection